﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace LTWF.Chuong_2.MDIFrom
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private void btn_From2_Click(object sender, EventArgs e)
        {
            Form2 frm = new Form2();
            frm.IsMdiContainer = true;
            frm.Show();
        }

        private void btn_from3_Click(object sender, EventArgs e)
        {
            Form frm = new Form3();
            frm.MdiParent = this;
            frm.Show();
        }

        private void btn_from4_Click(object sender, EventArgs e)
        {
            Form frm = new Form();
            frm.Name = "form4";
            frm.Text = "Form4";
            frm.ShowDialog();         
        }

        private void btn_from5_Click(object sender, EventArgs e)
        {
            Form frm = new Form();
            frm.Name = "form5";
            frm.Text = "form5_tieude";
            frm.Click +=
                delegate(object sender1, EventArgs e1)
                {
                    MessageBox.Show("Click on new form!","Message");
                };
            frm.Show();
        }        
    }
}
